<?php $this->extend('comm/page');?>

<table class="layui-table" lay-size="sm">
    <thead>
        <tr>
            <th>字段名</th>
            <th>数据类型</th>
            <th>主键</th>
            <th>默认值</th>
            <th>允许非空</th>
            <th>自动递增</th>
            <th>备注</th>
        </tr>
    </thead>
    <tbody>
        <?php foreach($data as $item): ?>
        <tr>
            <td><?php echo $item['COLUMN_NAME']; ?></td>
            <td><?php echo $item['COLUMN_TYPE']; ?></td>
            <td><?php echo ($item['COLUMN_KEY'] == 'PRI') ? '是' : '否'; ?></td>
            <td><?php echo $item['COLUMN_DEFAULT']; ?></td>
            <td><?php echo $item['IS_NULLABLE']; ?></td>
            <td><?php echo ($item['EXTRA'] == 'auto_increment') ? '是' : '否'; ?></td>
            <td><?php echo $item['COLUMN_COMMENT']; ?></td>
        </tr>
        <?php endforeach; ?>
    </tbody>
</table>